<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS结构</title>
</head>
<body>
<script>
   /* let name = 'ton';
    if (!name){
        alert("请心啊登录")
    }else {
        alert("欢迎"+name)
    }*/

   let gender =1;
   switch (gender) {
       case 1:
           console.log('nan')
           break;
       case 0:
           console.log('nv')
           break;
       default:
           console.log('weizhi')

   }
   let name = ['tom','jerry','lucy']
   for (let i = 0; i < name.length; i++) {
       console.log(name)
   }
   for (let n of name) {
       console.log(n)
   }
</script>
</body>
</html>